package com.xjm.ips.entity;

public class AjaxJson {
    private Integer status;
    private String msg;
    private Object obj;

    public static AjaxJson build(){
        return new AjaxJson();
    }

    public static AjaxJson ok(String msg){
        return new AjaxJson(200,msg,null);
    }

    public static AjaxJson ok(String msg,Object obj){
        return new AjaxJson(200,msg,obj);
    }

    public static AjaxJson error(String msg){
        return new AjaxJson(500,msg,null);
    }

    public static AjaxJson error(String msg,Object obj){
        return new AjaxJson(500,msg,obj);
    }

    private AjaxJson(){
    }

    private AjaxJson(Integer status, String msg, Object obj) {
        this.status = status;
        this.msg = msg;
        this.obj = obj;
    }

    public Integer getStatus() {
        return status;
    }

    public AjaxJson setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public AjaxJson setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public Object getObj() {
        return obj;
    }

    public AjaxJson setObj(Object obj) {
        this.obj = obj;
        return this;
    }
}
